package com.zhl.gradledemo.model;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Administrator on 2018/11/2.
 * 日记本 文章
 */
@Getter
@Setter
@Table(name = "article")
public class Article implements Serializable {


    private static final long serialVersionUID = -5181244639871300813L;
    @Id
    private Integer id;
    /**标题*/
    @Column
    private String title;
    /**内容*/
    @Column
    private String content;
    /**封面*/
    @Column
    private String cover;
    /**概述*/
    @Column
    private String synopsis;
    /**创建时间*/
    @Column(name = "create_time")
    private String createTime;
    /**修改时间*/
    @Column(name = "update_time")
    private String updateTime;
    /**作者*/
    @Column
    private int userid;
    /**文章类型
     * 1:技术分享
     * 2:生活点滴
     * 3:更新公告
     * */
    @Column(name = "article_type")
    private String articleType;
    /**是否原创*/
    @Column(name = "is_original")
    private String isOriginal;
    /**点击量*/
    @Column(name = "click_rate")
    private int clickRate;

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", cover='" + cover + '\'' +
                ", synopsis='" + synopsis + '\'' +
                ", createTime='" + createTime + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", userid=" + userid +
                ", articleType='" + articleType + '\'' +
                ", isOriginal='" + isOriginal + '\'' +
                ", clickRate=" + clickRate +
                '}';
    }
}
